<?php
namespace Home\Model;
use Think\Model\RelationModel;
class ArticleModel extends RelationModel{ 
       protected $_link = array( 
          'user'=>array(
		  'mapping_type'  =>self::BELONGS_TO,
		  'mapping_name'  =>'user',
		  'class_name'        =>  'user',
		  'foreign_key'   => 'article_user_id',
		  //'as_fields'     =>'user_id',
		  'as_fields'    =>'user_name,user_id,user_img'
		  //'condition'
		  ),
          );
		}
?>